#!/usr/bin/python3.8.9
# -*- coding: utf-8 -*-

# @Author  : Tina Yu
# @Time    : 2022-1-8 22:56
from appium.webdriver.common.mobileby import MobileBy

from homework.task_app.base.base_page import BasePage
from homework.task_app.page.member_edit_page import MemberEditPage


class MemberInfoPage(BasePage):
    def goto_member_edit(self):
        """进入个人信息的设置页面"""
        # 点击右上角
        self.find_and_click(MobileBy.XPATH,
                            "//*[@class='android.widget.ScrollView']/../*[@class='android.widget.RelativeLayout']"
                            "/*[@class='android.widget.LinearLayout'][2]")
        # 点击编辑成员
        self.find_and_click(MobileBy.XPATH, "//*[@text='编辑成员']")
        return MemberEditPage(self.driver)
